//
//  mFnyGKJLCFInviteWebViewControllertChoBH.m
//  qcb_ios
//
//  Created by Ji on 2018/9/6.
//  Copyright © 2018年 ski. All rights reserved.
//

#import "mFnyGKJLCFInviteWebViewControllertChoBH.h"

@interface mFnyGKJLCFInviteWebViewControllertChoBH ()

@end

@implementation mFnyGKJLCFInviteWebViewControllertChoBH

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    if ([JLCFRegisterService shareService].shareId) {
    
        NSDictionary *dic = @{@"id" : self.shareId};

        [self.bridge callHandler:@"functionInJs" data:[NSString jsonStringWithDict:dic] responseCallback:^(id responseData) {
            DBG(@"responseData :%@", responseData);
        }];
    
        [self.bridge registerHandler:@"submitFromWeb" handler:^(id data, WVJBResponseCallback responseCallback) {
            DBG(@"id : %@", data);
            NSDictionary *dic = (NSDictionary *)data;
            self.shareTitle = [dic safeObjectForKey:@"title"];
            self.shareDesc = [dic safeObjectForKey:@"label"];;
            self.shareUrl = [dic safeObjectForKey:@"url"];
            self.shareIcon = [UIImage imageNamed:@"icon_share"];
            
            dispatch_async(dispatch_get_main_queue(), ^{
                
                [self handleShare:nil];
            });
        }];
    }
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view PzfRvYcontrollerLrnibE using [segue destinationViewController].
    // Pass the selected object to the new view PzfRvYcontrollerLrnibE.
}
*/

@end
